package com.ruoyi.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 调拨管理对象 erp_inventory_transfer
 *
 * @author zhp
 * @date 2025-08-08
 */
public class ErpInventoryTransfer extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Long id;

    /**
     * 调拨单号
     */
    private String transferNo;

    /**
     * 调拨类型(1:正常调拨,2:紧急调拨)
     */
    private Long transferType;

    /**
     * 状态(0:待审核,1:已审核,2:部分调拨,3:已完成,4:已取消)
     */
    private Long status;

    /**
     * 源仓库ID
     */
    private Long fromWarehouseId;

    /**
     * 源库区ID
     */
    private Long fromAreaId;

    /**
     * 目标仓库ID
     */
    private Long toWarehouseId;

    /**
     * 目标库区ID
     */
    private Long toAreaId;

    /**
     * 计划调拨总数
     *
     */
    private BigDecimal totalQuantity;

    /**
     * 操作人ID
     */
    private Long operatorId;

    /**
     * 创建时间
     */
    private Date createdAt;

    /**
     * 更新时间
     */
    private Date updatedAt;

    /**
     * 备注
     */
    private String remark;

    //审核意见
    private String auditOpinion;

    //审核人ID
    private Long auditorId;

    //详表数据集合
    private List<ErpInventoryTransferDetail> detailList;

    // 来源仓库和库区（完整对象）
    private ErpWarehouse fromWarehouse;  // 来源仓库对象
    private ErpStorageArea fromArea;      // 来源库区对象

    // 目标仓库和库区（完整对象）
    private ErpWarehouse toWarehouse;    // 目标仓库对象
    private ErpStorageArea toArea;       // 目标库区对象

    //关联用户实体类对象
    private SysUser sysUser;

    //关联用户实体类对象
    private SysUser sysUser2;

    public SysUser getSysUser2() {
        return sysUser2;
    }

    public void setSysUser2(SysUser sysUser2) {
        this.sysUser2 = sysUser2;
    }

    public Long getAuditorId() {
        return auditorId;
    }

    public void setAuditorId(Long auditorId) {
        this.auditorId = auditorId;
    }

    public SysUser getSysUser() {
        return sysUser;
    }

    public void setSysUser(SysUser sysUser) {
        this.sysUser = sysUser;
    }

    public ErpWarehouse getFromWarehouse() {
        return fromWarehouse;
    }

    public void setFromWarehouse(ErpWarehouse fromWarehouse) {
        this.fromWarehouse = fromWarehouse;
    }

    public ErpStorageArea getFromArea() {
        return fromArea;
    }

    public void setFromArea(ErpStorageArea fromArea) {
        this.fromArea = fromArea;
    }

    public ErpWarehouse getToWarehouse() {
        return toWarehouse;
    }

    public void setToWarehouse(ErpWarehouse toWarehouse) {
        this.toWarehouse = toWarehouse;
    }

    public ErpStorageArea getToArea() {
        return toArea;
    }

    public void setToArea(ErpStorageArea toArea) {
        this.toArea = toArea;
    }

    public List<ErpInventoryTransferDetail> getDetailList() {
        return detailList;
    }

    public void setDetailList(List<ErpInventoryTransferDetail> detailList) {
        this.detailList = detailList;
    }

    public String getAuditOpinion() {
        return auditOpinion;
    }

    public void setAuditOpinion(String auditOpinion) {
        this.auditOpinion = auditOpinion;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }


    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setTransferNo(String transferNo) {
        this.transferNo = transferNo;
    }

    public String getTransferNo() {
        return transferNo;
    }

    public void setTransferType(Long transferType) {
        this.transferType = transferType;
    }

    public Long getTransferType() {
        return transferType;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    public Long getStatus() {
        return status;
    }

    public void setFromWarehouseId(Long fromWarehouseId) {
        this.fromWarehouseId = fromWarehouseId;
    }

    public Long getFromWarehouseId() {
        return fromWarehouseId;
    }

    public void setFromAreaId(Long fromAreaId) {
        this.fromAreaId = fromAreaId;
    }

    public Long getFromAreaId() {
        return fromAreaId;
    }

    public void setToWarehouseId(Long toWarehouseId) {
        this.toWarehouseId = toWarehouseId;
    }

    public Long getToWarehouseId() {
        return toWarehouseId;
    }

    public void setToAreaId(Long toAreaId) {
        this.toAreaId = toAreaId;
    }

    public Long getToAreaId() {
        return toAreaId;
    }

    public void setTotalQuantity(BigDecimal totalQuantity) {
        this.totalQuantity = totalQuantity;
    }

    public BigDecimal getTotalQuantity() {
        return totalQuantity;
    }

    public void setOperatorId(Long operatorId) {
        this.operatorId = operatorId;
    }

    public Long getOperatorId() {
        return operatorId;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("transferNo", getTransferNo())
                .append("transferType", getTransferType())
                .append("status", getStatus())
                .append("fromWarehouseId", getFromWarehouseId())
                .append("fromAreaId", getFromAreaId())
                .append("toWarehouseId", getToWarehouseId())
                .append("toAreaId", getToAreaId())
                .append("totalQuantity", getTotalQuantity())
                .append("operatorId", getOperatorId())
                .append("remark", getRemark())
                .append("auditorId", getAuditorId())
                .append("auditOpinion", getAuditOpinion())
                .append("createdAt", getCreatedAt())
                .append("updatedAt", getUpdatedAt())
                .append("DetailList", getDetailList())
                .toString();
    }

}
